<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { showDialog } from 'vant'
import navbar from '@/components/navbar.vue'
import tabbar from '@/components/tabbar.vue'
import { showSuccessToast } from 'vant';

// defineProps<{ msg: string }>()
// ruoter
const router = useRouter()
const username = ref('')
const message = ref('')
const onSubmit = (values) => {
  showSuccessToast('发送成功');
}
onMounted(() => {})
</script>

<template>
  <navbar title="发邮件" :left="true"> </navbar>
  <van-form @submit="onSubmit">
    <van-cell-group inset>
      <van-field v-model="username" name="标题" label="标题" placeholder="标题" :rules="[{ required: true, message: '请填写标题' }]" />
      <van-field v-model="message" rows="2" autosize label="留言" type="textarea" maxlength="50" placeholder="请输入留言" show-word-limit />
    </van-cell-group>
    <div style="margin: 16px">
      <van-button round block type="primary" native-type="submit"> 发送 </van-button>
    </div>
  </van-form>
</template>

<style scoped lang="scss">
.box-head {
  height: 110px;
  display: flex;
  padding: 20px 10px 10px 10px;
  border-bottom: 1px solid #e1e0e0;
  // justify-content: space-around;
  img {
    width: 40px;
    height: 40px;
  }
}
.box-right {
  display: flex;
  flex-direction: column;
  margin-left: 30px;
  .name {
    font-size: 14px;
    color: #333;
  }
  .account {
    font-size: 14px;
    color: #999;
  }
  .btn {
    font-size: 16px;
    color: #6696ab;
    margin-top: 10px;
  }
}
.box-flex {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  color: #333;
}
.btn-link {
  span {
    color: #333;
    font-size: 16px;
    margin-right: 10px;
  }
  i {
    border: 1px solid #157df8;
    color: #157df8;
    font-style: normal;
    font-size: 12px;
    border-radius: 20px;
    padding: 0 10px;
  }
  &:hover {
    background-color: #ebebeb;
  }
  text-decoration: none;
  padding: 10px;
}
</style>
